#include "bbCore.h"

bbCore *core;
bbDx9 *dx;
bbInpt *di;
float color = 1.0f;

bool draw()
{
	dx->bb_BeginScene(color);
	dx->bb_EndScene();
	return true;
}
bool frame()
{
	if (di->bb_IsKeyPressed(DIK_ESCAPE)){
		return false;
	}
	return true;
}
void load()
{
	dx = core->bb_GetRender();
	di = core->bb_GetInput();
}
int main()
{
	core = new bbCore("Test", 800, 600, false);
	if (core->bb_IsEngineInited){
		if (core->bb_InitDirect(false, true)){
			core->bb_RunCore(draw, frame, load);
		}else{
			return -1;
		}
	}
	delete core;
	return 0;
}